package com.ck.model.company.vo;

import com.ck.constant.BusinessConstant;
import com.ck.util.DateUtils;

/**
 * 终端列表DTO - 商家展示
 */
public class CpDeviceInfoListVO {
	/** 创建时间 */
	private Long createTime;
	/** 终端机器码 */
	private String deviceNum;
	/** 终端MAC地址 */
	private String deviceMac;
	/** 终端MAC地址 */
	private String deviceName;
	/** 终端型号 */
	private String deviceModel;
	/** 终端IP */
	private String deviceIp;
	/** 0.在线; 1.离线 */
	private Integer deviceStatus;
	/** 终端软件mips版本 */
	private String deviceSoftVer;
	/** 终端关键版本 */
	private	String deviceFirmwareVer;

	public Long getCreateTime() {
		return createTime;
	}
	
	public String getCreateTimeDesc() {
		if ( null == createTime ) {
			return null;
		}
		return DateUtils.longTimeStampToStringDate(createTime, DateUtils.PATTEN_YMD_HMS); 
	}
	
	public void setCreateTime(Long createTime) {
		this.createTime = createTime;
	}

	public String getDeviceNum() {
		return deviceNum;
	}

	public void setDeviceNum(String deviceNum) {
		this.deviceNum = deviceNum;
	}

	public String getDeviceMac() {
		return deviceMac;
	}

	public void setDeviceMac(String deviceMac) {
		this.deviceMac = deviceMac;
	}
	
	public String getDeviceName() {
		return deviceName;
	}

	public void setDeviceName(String deviceName) {
		this.deviceName = deviceName;
	}

	public String getDeviceModel() {
		return deviceModel;
	}

	public void setDeviceModel(String deviceModel) {
		this.deviceModel = deviceModel;
	}

	public String getDeviceIp() {
		return deviceIp;
	}

	public void setDeviceIp(String deviceIp) {
		this.deviceIp = deviceIp;
	}

	public Integer getDeviceStatus() {
		return deviceStatus;
	}
	
	public String getDeviceStatusDesc() {
		if (BusinessConstant.DEVICE_INFO_STATUS_ON_LINE == deviceStatus) {
			return "在线";
		}else {
			return "离线";
		}
	}
	
	public void setDeviceStatus(Integer deviceStatus) {
		this.deviceStatus = deviceStatus;
	}

	public String getDeviceSoftVer() {
		return deviceSoftVer;
	}

	public void setDeviceSoftVer(String deviceSoftVer) {
		this.deviceSoftVer = deviceSoftVer;
	}
	
	public String getDeviceFirmwareVer() {
		return deviceFirmwareVer;
	}

	public void setDeviceFirmwareVer(String deviceFirmwareVer) {
		this.deviceFirmwareVer = deviceFirmwareVer;
	}

	@Override
	public String toString() {
		return "CpDeviceInfoListVO{" +
				"createTime=" + createTime +
				", deviceNum='" + deviceNum + '\'' +
				", deviceMac='" + deviceMac + '\'' +
				", deviceName='" + deviceName + '\'' +
				", deviceModel='" + deviceModel + '\'' +
				", deviceIp='" + deviceIp + '\'' +
				", deviceStatus=" + deviceStatus +
				", deviceSoftVer='" + deviceSoftVer + '\'' +
				", deviceFirmwareVer='" + deviceFirmwareVer + '\'' +
				'}';
	}
}
